package com.webmagic.house.analy;

import org.apache.commons.codec.digest.DigestUtils;

import java.util.Calendar;

/**
 * @author wen
 * @Title: Output
 * @ProjectName house
 * @Description: TODO
 * @date 2020/1/110:30
 */
public class Output {

    private static final String PATH_SEPERATOR = "/";
    public static void main(String[] args) throws InterruptedException {
       // String ss = DigestUtils.md5Hex("123456");
        //System.out.println(ss);

//					Calendar cal = Calendar.getInstance();
//					int year = cal.get(Calendar.YEAR);
//					Integer month = cal.get(Calendar.MONTH)+1;
//					int date = cal.get(Calendar.DATE);
//					int hour = cal.get(Calendar.HOUR_OF_DAY);
//					int minute = cal.get(Calendar.MINUTE);
//					int second = cal.get(Calendar.SECOND);
//					//String path =month+PATH_SEPERATOR+ date+PATH_SEPERATOR+hour+PATH_SEPERATOR+minute+PATH_SEPERATOR+second+PATH_SEPERATOR;
//					System.out.println(String.format("%d_0%d_0%d_%d_%d_%d",year,month,date,hour,minute,second));
        boolean flag = "https://www.qdfd.com.cn/qdweb/realweb/fh/FhProjectQueryNew.jsp?page=1".matches("https://www\\.qdfd\\.com\\.cn/qdweb/realweb/fh/FhProjectQueryNew\\.jsp\\?page=[1-5]{1}$");
        System.out.println(flag);
    }
    public static String getOutputFilePath(String root){

        Calendar cal = Calendar.getInstance();
        int month = cal.get(Calendar.MONTH);
        int date = cal.get(Calendar.DATE);
        int hour = cal.get(Calendar.HOUR_OF_DAY);
        int minute = cal.get(Calendar.MINUTE);
        int second = cal.get(Calendar.SECOND);
        String path =root+PATH_SEPERATOR+month+PATH_SEPERATOR+ date+PATH_SEPERATOR+hour+PATH_SEPERATOR+minute+PATH_SEPERATOR+second+PATH_SEPERATOR;
        //	System.out.println(path);
        return path;

    }


}
